/*
 * Name      = Pflichtfelderhack
 * Version   = 1.0.0
 * Datum     = 12.09.2009
 * Copyright = -[ESA]-Lucky
 * Homepage  = http://www.esa-clan.de
 * eMail     = esa@esa-clan.de
 * * * * * * * * * * * * * * * * * * */

Pflichtfelderhack NUR fr PHPKIT 1.6.5
######################################
--------------------------------------------------------------------------------------------------------------------
Infos:
--------------------------------------------------------------------------------------------------------------------
Features:
Im Adminbereich:
- Beim erstellen eine Feldes auswhlbar ob Textfeld, Textarea oder nummerisch
- Auswahl ob es ein Pflichtfeld sein soll
- Profil wird nicht geprft
- Status ab wann ein User das Profilfeld editieren oder anschauen kann
- Profilfelder knnen Gruppen zugeteilt werden
- Smilies erlaubt
- Bitte pro Gruppe nur ein Groupname angeben
- Ausgabe der gewnschten Profilfelder im Forum

Bsp. 
Erstellt ein neues Profilfeld mit "Ordnungsnummer in der Gruppe" = 1 und "Gruppe (Nur 1x pro Gruppe angeben)" = Gruppenname und "Nummer der Gruppe" = 1
Hier habt Ihr nun eine Gruppe angelegt die zuerst ausgegeben wird und in der Gruppe wird das Feld als erstes ausgegeben.
Nun:
Erstellt ein neues Profilfeld mit "Ordnungsnummer in der Gruppe" = 2 und "Gruppe (Nur 1x pro Gruppe angeben)" = leer lassen und "Nummer der Gruppe" = 1
Ihr habt nun in der Gruppe 1 ein zweites Feld erstellt was auch als 2tes ausgegeben wird.


Bsp Forum:
Ihr knnt mal als test unter 
Text oder Zeichen
HTML oder BBCode erlaubt

Das hier eingeben
<img border="0" alt="Telefon" title="Telefon" width="10" height="10" src="images/telefon.gif" />

Nun noch eine Grafik telefon.gif in den Ordner images hochladen. width und height muss angepasst werden.


Zeichenbegrenzung im Forum
Bei 0 wird der Text auf 20 Zeichen reduziert.
--------------------------------------------------------------------------------------------------------------------
Installation:
--------------------------------------------------------------------------------------------------------------------
!!! Wie immer gilt, zuerst Backup der Originaldateien sowie der Datenbank machen. !!!

Kopiere ausser der Anleitung alle Dateien aus dem Ordner Pflichtfelder ins Rootverzeichnis vom PHPKIT.
Nun fhrt die install.php mit folgendem Pfad aus.
http://www.deinedomain.de/zumrootverzeichnis/include.php?path=install oder
http://www.deinedomain.de/include.php?path=install

Lsche nach der Installation die setup.php
Das war es auch schon.

Diese Dateien mssen manuell angepasst werden. 

####################################################################################################################
----------->
Editiere die pkinc/admin/useredit.php
----------->
SUCHE:
	$userinfo=$SQL->fetch_array($SQL->query("SELECT * FROM ".pkSQLTAB_USER." WHERE user_id='".intval($editid)."'"));
	$userfields=$SQL->fetch_array($SQL->query("SELECT * FROM ".pkSQLTAB_USER_FIELDS." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
	
	$edituser_profilefields='';
	$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_order ASC");
	while($profilefields=$SQL->fetch_array($getprofilefields))
		{
		$f="field_".$profilefields['profilefields_id'];
		$fieldcontent=pkEntities($userfields[$f]);
		$fieldname=pkEntities($profilefields['profilefields_name']);
		
		eval("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields")."\";");
		}

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/
	$userinfo=$SQL->fetch_array($SQL->query("SELECT * FROM ".pkSQLTAB_USER." WHERE user_id='".intval($editid)."'"));
	$userfields=$SQL->fetch_array($SQL->query("SELECT * FROM ".pkSQLTAB_USER_FIELDS." WHERE userid='".intval($userinfo['user_id'])."' LIMIT 1"));
	
	$edituser_profilefields='';
	$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_order ASC");
	while($profilefields=$SQL->fetch_array($getprofilefields))
		{
		$f="field_".$profilefields['profilefields_id'];
		$fieldcontent=pkEntities($userfields[$f]);
		$fieldname=pkEntities($profilefields['profilefields_name']);
		if($profilefields['profilefields_groups']!='') {
		eval ("\$edituser_profilfields_groups= \"".pkTpl("edituser_profilfields_groups")."\";");}
		else unset($edituser_profilfields_groups);
		if(empty($profilefields['profilefields_pflicht']) AND empty($profilefields['profilefields_area'])){ unset($pflichtfeld);
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields")."\";");}
		elseif(empty($profilefields['profilefields_pflicht']) AND $profilefields['profilefields_area']=="1"){ unset($pflichtfeld);
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields_area")."\";");}
		elseif(empty($profilefields['profilefields_pflicht']) AND $profilefields['profilefields_area']=="2"){ unset($pflichtfeld);
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields_num")."\";");}
		elseif($profilefields['profilefields_pflicht']=="1" AND empty($profilefields['profilefields_area'])){$pflichtfeld='<span style="color:#d70007;">*</span>';
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields")."\";");}
		elseif($profilefields['profilefields_pflicht']=="1" AND $profilefields['profilefields_area']=="1"){$pflichtfeld='<span style="color:#d70007;">*</span>';
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields_area")."\";");}
		elseif($profilefields['profilefields_pflicht']=="1" AND $profilefields['profilefields_area']=="2"){$pflichtfeld='<span style="color:#d70007;">*</span>';
		eval ("\$edituser_profilefields.= \"".pkTpl("edituser_profilefields_num")."\";");}
		}
/********************************  Pflichtfeld Ende. Original wir nur angepasst    ********************************/
####################################################################################################################
----------->
Editiere die pkinc/admin/userprofilefields.php
----------->
SUCHE:
		$SQL->query("UPDATE ".pkSQLTAB_USER_PROFILEFIELDS." 
			SET profilefields_name='".$SQL->f($_POST['field_name'])."',
				profilefields_description='".$SQL->f($_POST['field_description'])."',
				profilefields_maxlength='".intval($field_maxlength)."',
				profilefields_order='".intval($_POST['field_order'])."'
			WHERE profilefields_id='".$id."'");

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/
		$SQL->query("UPDATE ".pkSQLTAB_USER_PROFILEFIELDS."  
			SET profilefields_name='".$SQL->f($_POST['field_name'])."',
				profilefields_description='".$SQL->f($_POST['field_description'])."',
				profilefields_maxlength='".$SQL->i($field_maxlength)."',
				profilefields_order='".$SQL->i($_POST['field_order'])."',
				profilefields_status='".$SQL->f($_POST['edit_status'])."',
				profilefields_status_edit='".$SQL->f($_POST['edit_ed_status'])."',
				profilefields_pflicht='".$SQL->f($_POST['field_pflicht'])."',
				profilefields_area='".$SQL->f($_POST['field_area'])."',
				profilefields_groups='".$SQL->f($_POST['field_groups'])."',
				profilefields_sorts='".$SQL->i($_POST['field_sorts'])."',
				profilefields_bbcode='".$SQL->f($_POST['field_bbcode'])."',
				profilefields_forum='".$SQL->f($_POST['field_forum'])."',
				profilefields_forum_description='".$SQL->f($_POST['field_forum_description'])."',
				profilefields_cut='".$SQL->f($_POST['field_cut'])."'
			WHERE profilefields_id='".intval($id)."'");
/********************************  Pflichtfeld Ende.   Original wir nur angepasst  ********************************/


SUCHE:
		$fieldid=$profilefield['profilefields_id'];
		$fieldname=pkEntities($profilefield['profilefields_name']);
		$fielddescription=pkEntities($profilefield['profilefields_description']);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang.********************************/
                $fieldgroups=pkEntities($profilefield['profilefields_groups']);
		if($profilefield['profilefields_bbcode']==1) $field_bbcode=' checked="checked"'; else $field_bbcode='';
		if($profilefield['profilefields_pflicht']==1) $pflichtfeld1=' selected="selected"'; else $pflichtfeld0=' selected="selected"';
		if($profilefield['profilefields_area']==0) $area0=' selected="selected"'; 
		elseif($profilefield['profilefields_area']==1) $area1=' selected="selected"';
		elseif($profilefield['profilefields_area']==2) $area2=' selected="selected"';
		$fieldforum=htmlspecialchars(trim($profilefield['profilefields_forum_description']));
		$fieldcut=pkEntities($profilefield['profilefields_cut']);
		if($profilefield['profilefields_forum']==1) $field_forum=' checked="checked"'; else $field_forum='';

		if ($_POST['edit_status']=="admin") $info_status5=' selected="selected"';
		elseif ($_POST['edit_status']=="mod") $info_status4=' selected="selected"';
		elseif ($_POST['edit_status']=="vip") $info_status3=' selected="selected"';
		elseif ($_POST['edit_status']=="member") $info_status2=' selected="selected"';
		elseif ($_POST['edit_status']=="guest") $info_status0=' selected="selected"';

		if ($profilefield['profilefields_status']=="admin") $info_status5=' selected="selected"';
		elseif ($profilefield['profilefields_status']=="mod") $info_status4=' selected="selected"';
		elseif ($profilefield['profilefields_status']=="vip") $info_status3=' selected="selected"';
		elseif ($profilefield['profilefields_status']=="member") $info_status2=' selected="selected"';
		elseif ($profilefield['profilefields_status']=="guest") $info_status0=' selected="selected"';

		if ($_POST['edit_ed_status']=="admin") $info_ed_status5=' selected="selected"';
		elseif ($_POST['edit_ed_status']=="mod") $info_ed_status4=' selected="selected"';
		elseif ($_POST['edit_ed_status']=="vip") $info_ed_status3=' selected="selected"';
		elseif ($_POST['edit_ed_status']=="member") $info_ed_status2=' selected="selected"';
		elseif ($_POST['edit_ed_status']=="user") $info_ed_status1=' selected="selected"';

		if ($profilefield['profilefields_status_edit']=="admin") $info_ed_status5=' selected="selected"';
		elseif ($profilefield['profilefields_status_edit']=="mod") $info_ed_status4=' selected="selected"';
		elseif ($profilefield['profilefields_status_edit']=="vip") $info_ed_status3=' selected="selected"';
		elseif ($profilefield['profilefields_status_edit']=="member") $info_ed_status2=' selected="selected"';
		elseif ($profilefield['profilefields_status_edit']=="user") $info_ed_status1=' selected="selected"';
/********************************  Pflichtfeld Anfang.********************************/


SUCHE:
$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_order ASC");
while($profilefields=$SQL->fetch_array($getprofilefields))

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/
$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_sorts ASC, profilefields_order ASC");
while($profilefields=$SQL->fetch_array($getprofilefields))
/********************************  Pflichtfeld Ende.   Original wir nur angepasst  ********************************/


SUCHE:
	{
	$row=rowcolor($row);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang.********************************/
   if($profilefields['profilefields_bbcode']==1) $bbcode_ok='Ja'; else $bbcode_ok='Nein';
   if($profilefields['profilefields_pflicht']==1) $profilefields_pflicht='Ja'; else $profilefields_pflicht='Nein';
   if($profilefields['profilefields_area']==1) $profilefields_area='Textarea'; 
   elseif($profilefields['profilefields_area']==2) $profilefields_area='Nummerisch';
   else $profilefields_area='Textfeld';
   if($profilefields['profilefields_forum']==1) $profilefields_forum='Ja'; else $profilefields_forum='Nein';
/********************************  Pflichtfeld Ende.  ********************************/
####################################################################################################################
----------->
Editiere die pkinc/admintpl/edituser_profilefields.htm
-----------
SUCHE:
 <tr>
  <td class="left">$fieldname</td>

ERSETZE ALLES HIERMIT:
$edituser_profilfields_groups
 <tr>
  <td class="left">$fieldname $pflichtfeld</td>
####################################################################################################################
----------->
Editiere die pkinc/admintpl/profilefields.htm
-----------
ERSETZE den kompletten Inhalt HIERMIT:
<table class="standard" border="0" cellspacing="1" cellpadding="4" width="100%">
 <tr>
  <td class="heads" colspan="13">Profilfelder</td>
 </tr>
 <tr>
  <td class="highlight" width="8%"><font class="small">Gruppe</font></td>
  <td class="highlight" width="1%"><font class="small">Sort</font></td>
  <td class="highlight" width="1%"><font class="small">Nr.</font></td>
  <td class="highlight" width="5%"><font class="small">Look</font></td>
  <td class="highlight" width="5%"><font class="small">Edit</font></td>
  <td class="highlight" width="20%"><font class="small">Feldname</font></td>
  <td class="highlight" width="10%"><font class="small">Beschreibung</font></td>
  <td class="highlight" width="6%" align="center"><font class="small">Pflicht</font></td>
  <td class="highlight" width="5%" align="center"><font class="small">Info</font></td>
  <td class="highlight" width="7%"><font class="small">BBCode</font></td>
  <td class="highlight" width="10%" align="center"><font class="small">Forum</font></td>
  <td class="highlight" width="20%" colspan="2" align="center"><font class="small">Optionen</font></td>
 </tr>
	$profilefields_row
 <tr>
  <td class="highlight" colspan="13" align="right"><a href="admin.php?path=userprofilefields&amp;id=new"><b>Neues Feld erzeugen</b></a></td>
 </tr>
</table>
####################################################################################################################
----------->
Editiere die pkinc/admintpl/profilefields_row.htm
-----------
ERSETZE den kompletten Inhalt HIERMIT:
 <tr>
  <td class="$row" align="center">$profilefields[profilefields_groups]</td>
  <td class="$row" align="center">$profilefields[profilefields_sorts]</td>
  <td class="$row" align="center">$profilefields[profilefields_order]</td>
  <td class="$row" align="center">$profilefields[profilefields_status]</td>
  <td class="$row" align="center">$profilefields[profilefields_status_edit]</td>
  <td class="$row">$profilefields[profilefields_name]</td>
  <td class="$row">$profilefields[profilefields_description]</td>
  <td class="$row" align="center">$profilefields_pflicht</td> 
  <td class="$row" align="center">$profilefields_area</td>
  <td class="$row" align="center">$bbcode_ok</td>
  <td class="$row" align="center">$profilefields_forum</td>
  <td class="$row" width="10%" align="center"><a href="admin.php?path=userprofilefields&amp;action=edit&amp;id=$profilefields[profilefields_id]">bearbeiten</a></td>
  <td class="$row" width="10%" align="center"><a href="admin.php?path=userprofilefields&amp;action=drop&amp;id=$profilefields[profilefields_id]"><font class="highlight">l&#246;schen</font></a></td>
  </tr>
####################################################################################################################
----------->
Editiere die pkinc/admintpl/profilefields_form.htm
-----------
SUCHE:
 <tr>
  <td class="left">Ordnungsnummer<br />
  	<font class="small">&nbsp;</font></td>
  <td class="right"><input type="text" name="field_order" value="$fieldorder" size="5" /></td>
 </tr>

ERSETZE ALLES HIERMIT:
$edituser_profilfields_groups
 <tr>
  <td class="left">Ordnungsnummer in der Gruppe<br />
  	<font class="small">&#160;</font></td>
  <td class="right"><input type="text" name="field_order" value="$fieldorder" size="5" /></td>
 </tr>
 <tr>
  <td class="left" width="50%">Gruppe (Nur 1x pro Gruppe angeben)<br />
      <font class="small">&#160;</font></td>
  <td class="right" width="50%"><input type="text" name="field_groups" value="$fieldgroups" size="25" class="w90" /></td>
 </tr>
 <tr>
  <td class="left">Nummer der Gruppe<br />
      <font class="small">&#160;</font></td>
  <td class="right"><input type="text" name="field_sorts" value="$profilefield[profilefields_sorts]" size="5" /></td>
 </tr>
 <tr>  <td class="left">Pflichtfeld</td>
  <td class="right">
	<select name="field_pflicht" size="2" class="w35">
	<option value="0" $pflichtfeld0>Nein</option>
	<option value="1" $pflichtfeld1>Ja</option>
	</select></td>
 </tr>
 <tr>  
  <td class="left">Userstatus um zu sehen</td>  
  <td class="right">	
        <select name="edit_status" size="1" class="w90">	
        <option value="guest" $info_status0>$lang[guest]</option>	
        <option value="user" $info_status1>$lang[user]</option>	
        <option value="member" $info_status2>$lang[member]</option>	
        <option value="mod" $info_status4>$lang[mod]</option>	
        <option value="admin" $info_status5>$lang[admin]</option>	
        </select></td>
 </tr>
 <tr>  
  <td class="left">Userstatus um zu editieren</td>  
  <td class="right">	
        <select name="edit_ed_status" size="1" class="w90">		
        <option value="user" $info_ed_status1>$lang[user]</option>	
        <option value="member" $info_ed_status2>$lang[member]</option>	
        <option value="mod" $info_ed_status4>$lang[mod]</option>	
        <option value="admin" $info_ed_status5>$lang[admin]</option>	
        </select></td>
 </tr>
 <tr>
  <td class="left">Textarea</td>
  <td class="right">
	<select name="field_area" size="3" class="w35">
	<option value="0" $area0>Textfeld</option>
	<option value="1" $area1>Textarea</option>
	<option value="2" $area2>Nummerisch</option>
	</select></td>
 </tr>
 <tr>
  <td class="left" valign="top">BBCode erlauben?</td>
  <td class="right"><font class="small"> 
    <input class="checkbox" type="checkbox" value="1" name="field_bbcode" $field_bbcode /> F&#252;r aktiv einen Haken setzen</font></td>
 </tr>
 <tr>
  <td class="left" valign="top">Anzeige im Forum?</td>
  <td class="right"><font class="small"> 
    <input class="checkbox" type="checkbox" value="1" name="field_forum" $field_forum /> F&#252;r aktiv einen Haken setzen</font></td>
 </tr>
 <tr>
  <td class="left" valign="top">Text oder Zeichen<br />
      <font class="small">HTML oder BBCode erlaubt</font></td>
  <td class="right"><textarea name="field_forum_description" cols="30" rows="3" class="w90">$fieldforum</textarea></td>
 </tr>
 <tr>
  <td class="left">Zeichenbegrenzung im Forum<br />
      <font class="small">&#160;</font></td>
  <td class="right"><input type="text" name="field_cut" value="$fieldcut" size="3" /></td>
 </tr>
####################################################################################################################
#HOMEPAGE##################################################################################################HOMEPAGE#
####################################################################################################################
----------->
Editiere die pkinc/lang/de/event.php
-----------
SUCHE:
'event_profileupdate_email_in_use'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br /><br />Die von Ihnen angegebene E-Mail-Adresse ist bereits in Verwendung durch einen anderen Benutzer. Bitte w&#228;hlen Sie eine andere E-Mail-Adresse.',

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
'eventtitle_profileupdate_kein_datum_angegeben'=>'Kein Geburtstag angegeben',  
'event_profileupdate_kein_datum_angegeben'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br/><br/>Sie haben Ihr Geburtstag nicht angegeben',
'eventtitle_profileupdate_kein_bundesland_gewaehlt'=>'Kein Bundesland angegeben',  
'event_profileupdate_kein_bundesland_gewaehlt'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br/><br/>Sie haben kein Bundesland gewhlt',
'eventtitle_profileupdate_kein_geschlecht_gewaehlt'=>'Kein Geschlecht angegeben',  
'event_profileupdate_kein_geschlecht_gewaehlt'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br/><br/>Sie haben Ihr Geschlecht nicht gewhlt',
'eventtitle_profileupdate_profilfelder_nicht_ausgefuellt'=>'Fehler',  
'event_profileupdate_profilfelder_nicht_ausgefuellt'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br/><br/>Sie haben die mit (*) makierten Profilfelder nicht ausgef&#252;llt',
'eventtitle_profileupdate_nummerisch'=>'Fehler',  
'event_profileupdate_nummerisch'=>'Beim Update Ihres Benutzerprofils ist leider ein Fehler aufgetreten!<br /><br />Bei den Feldern (Nur Zahlen erlaubt) sind halt nur Zahlen erlaubt.',
'eventtitle_profileupdate_wechsel_datum'=>'Fehler',  
'event_profileupdate_wechsel_datum'=>'Das Geburtsdatum ist nicht m&#246;glich.',
/********************************  Pflichtfeld Ende    ********************************/
####################################################################################################################
----------->
Editiere die pkinc/public/registration.php
-----------
SUCHE:
if(!defined('pkFRONTEND') || pkFRONTEND!='public')
	die('Direct access to this location is not permitted.');

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
pkLoadLang('profile');
pkLoadFunc('user');
/********************************  Pflichtfeld Ende    ********************************/


SUCHE:
		if(isset($_POST['newpass2']))
			$newpass2=$_POST['newpass2'];

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
		if (isset($_POST['ud_bd_day']))
			$user_bd_day=trim($_POST['ud_bd_day']);
		if (isset($_POST['ud_bd_month']))
			$user_bd_month=trim($_POST['ud_bd_month']);
		if (isset($_POST['ud_bd_year']))
			$user_bd_year=trim($_POST['ud_bd_year']);
		if (isset($_POST['ud_country']))
			$user_country=trim($_POST['ud_country']);
		if (isset($_POST['ud_sex']))
			$user_sex=trim($_POST['ud_sex']);

		if(is_array($_POST['feld_id']))
		foreach($_POST['feld_id'] as $id => $value){
		$felder=$SQL->fetch_array($SQL->query("SELECT * FROM `".pkSQLTAB_USER_PROFILEFIELDS."` WHERE `profilefields_id`='".intval($id)."' LIMIT 1"));
		if($felder['profilefields_pflicht']==1){
		if($value=="") {
			$error1=TRUE; $ausgabe_error=$felder['profilefields_name'];
			}
		}
		if($felder['profilefields_area']==2){
		if(preg_match('/[^-.0-9]/', $value))
			$error2=TRUE;
			}
		}
/********************************  Pflichtfeld Ende    ********************************/


SUCHE:
		elseif($config['user_registry']==2 && ($newpass!=$newpass2)) 
			$error=8;

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
		elseif ($_POST['ud_sex']=='d')
			$error=23;
		elseif ($_POST['ud_bd_month']==0 or $_POST['ud_bd_day']==0 or $_POST['ud_bd_year']==0)
			$error=22;
		elseif(!checkdate($_POST['ud_bd_month'],$_POST['ud_bd_day'],$_POST['ud_bd_year']))
			$error=21;
		elseif ($_POST['ud_country']=='def' or $_POST['ud_country']=='00' or $_POST['ud_country']=='')
			$error=24;
		elseif ($error1)
			$error=20;
		elseif ($error2)
			$error=25;
/********************************  Pflichtfeld Ende    ********************************/


SUCHE:
					$SQL->query("INSERT INTO ".pkSQLTAB_USER." 
						(uid, user_name, user_nick, user_pw, user_email, user_status, signin, lastlog, user_activate)
						VALUES
						('".$SQL->f($uid)."','".$SQL->f($newuser)."','".$SQL->f($newuser)."',
						 '".$SQL->f($sqlpassword)."','".$SQL->f($newemail)."','user',
						 '".pkTIME."','".pkTIME."','".intval($config['user_activate'])."')");



ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/
					$SQL->query("INSERT INTO ".pkSQLTAB_USER." 
						(uid, user_name, user_nick, user_pw, user_email, user_sex, user_country, user_status, signin, lastlog, 								 user_activate, user_bd_day, user_bd_month, user_bd_year)
						VALUES
						('".$SQL->f($uid)."','".$SQL->f($newuser)."','".$SQL->f($newuser)."',
						 '".$SQL->f($sqlpassword)."','".$SQL->f($newemail)."',
						 '".$SQL->f($user_sex)."','".$SQL->f($user_country)."','user',
						 '".pkTIME."','".pkTIME."','".$SQL->i($config['user_activate'])."','".$SQL->i($user_bd_day)."',
						 '".$SQL->i($user_bd_month)."','".$SQL->i($user_bd_year)."')");
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/




SUCHE:
					$info = $SQL->insert_id();

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
					if($info>0){
					$SQL->query("INSERT INTO `".pkSQLTAB_USER_FIELDS."` (userid) VALUES ('".$info."')");
					if(is_array($_POST['feld_id'])){
					foreach($_POST['feld_id'] as $ids => $value){
					$SQL->query("UPDATE `".pkSQLTAB_USER_FIELDS."` set `field_".intval($ids)."`='".$SQL->f($value)."' WHERE 							`userid`='".intval($info)."' LIMIT 1");
					  }
 					 }
					}
/********************************  Pflichtfeld Ende    ********************************/



SUCHE:
	$newuser=pkEntities($newuser);
	$newemail=pkEntities($newemail);
	$newemail2=pkEntities($newemail2);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
	if($_POST['ud_sex']=='d') $user_sex_option_0=' selected="selected"';
	elseif($_POST['ud_sex']=='w') $user_sex_option_1=' selected="selected"';
	elseif($_POST['ud_sex']=='m') $user_sex_option_2=' selected="selected"';
	if(empty($_POST['ud_country'])) $_POST['ud_country']='def';
	$user_country=pkUserCountryOptionlist($_POST['ud_country']);
	foreach(range(1,31) as $d)
	$bd_option_day.='<option value="'.$d.'"'.($user_bd_day==$d ? ' selected="selected"' : '').'>'.$d.'</option>';
	foreach(range(1,12) as $m)
	$bd_option_month.='<option value="'.$m.'"'.($user_bd_month==$m ? ' selected="selected"' : '').'>'.pkGetSpecialLang('month',$m).'</option>';  
	foreach(range(date('Y')-5,1900) as $y)
	$bd_option_year.='<option '.($user_bd_year==$y ? ' selected="selected"' : '').'>'.$y.'</option>';
	$fehler=$_POST['feld_id'];
	$getfeld=$SQL->query("SELECT * FROM `".pkSQLTAB_USER_PROFILEFIELDS."` WHERE `profilefields_pflicht`='1' ORDER by `profilefields_order` ASC");
	while($info_feld = $SQL->fetch_array($getfeld)) {
	$fieldname=$info_feld['profilefields_name'];
	$name=$info_feld['profilefields_id'];
	$value=$fehler[$info_feld['profilefields_id']];
	$fielddescription=$info_feld['profilefields_description'];
	if($info_feld['profilefields_pflicht']=="0" AND $info_feld['profilefields_area']=="0"){ unset($pflichtfeld);
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield")."\";");}
	elseif($info_feld['profilefields_pflicht']=="0" AND $info_feld['profilefields_area']=="1"){ unset($pflichtfeld);
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield_area")."\";");}
	elseif($info_feld['profilefields_pflicht']=="0" AND $info_feld['profilefields_area']=="2"){ unset($pflichtfeld);
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield_num")."\";");}
	elseif($info_feld['profilefields_pflicht']=="1" AND $info_feld['profilefields_area']=="0"){$pflichtfeld='<span style="color:#d70007;">*</span>';
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield")."\";");}
	elseif($info_feld['profilefields_pflicht']=="1" AND $info_feld['profilefields_area']=="1"){$pflichtfeld='<span style="color:#d70007;">*</span>';
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield_area")."\";");}
	elseif($info_feld['profilefields_pflicht']=="1" AND $info_feld['profilefields_area']=="2"){$pflichtfeld='<span style="color:#d70007;">*</span>';
	eval ("\$editprofile_userfield.= \"".pkTpl("register_userfield_num")."\";");}
	}
/********************************  Pflichtfeld Ende    ********************************/



SUCHE:
	if(isset($error) && $error>=1 && $error<=9)
		{
		$error_message = pkGetLang('registration_error_'.$error);
		}

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/
	$error_tpl_search=array('20', '21', '22', '23', '24', '25');		
	if(isset($error) && $error>=1 && $error<=30)
		{
		if(in_array($error, $error_tpl_search)) eval("\$error_message= \"".pkTpl("register_error_".$error)."\";");
		else $error_message = pkGetLang('registration_error_'.$error);
		}
/********************************  Pflichtfeld Ende.   Original wir nur angepasst  ********************************/
####################################################################################################################
----------->
Editiere die pkinc/public/userprofile.php
-----------
SUCHE:
		if(isset($_POST['save']) && $ACTION==$_POST['save']) 
			{
			$uderror=NULL;

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
			$_POST['user_bd_month']=trim($_POST['user_bd_month']);
			$_POST['user_bd_day']=trim($_POST['user_bd_day']);
			$_POST['user_bd_year']=trim($_POST['user_bd_year']);
			$_POST['ud_country']=trim($_POST['ud_country']);
			$_POST['ud_sex']=trim($_POST['ud_sex']);
			if(is_array($_POST['profilefields']))
			foreach($_POST['profilefields'] as $id => $value){
			$felder=$SQL->fetch_array($SQL->query("SELECT * FROM `".pkSQLTAB_USER_PROFILEFIELDS."` WHERE `profilefields_id`='".intval($id)."' LIMIT 1"));
			if($felder['profilefields_pflicht']==1){
			if($value=="") $uderror='profilfelder_nicht_ausgefuellt';}
			if($felder['profilefields_area']==2){
			if(!ctype_digit($value) && !empty($value)) $uderror='nummerisch';}}
			if($_POST['ud_country']=='def') $uderror='kein_bundesland_gewaehlt';   
			elseif ($_POST['ud_country']=='00') $uderror='kein_bundesland_gewaehlt';  
			elseif ($_POST['ud_country']=='') $uderror='kein_bundesland_gewaehlt';
			if($_POST['user_bd_month']=='0' or $_POST['user_bd_day']=='0' or $_POST['user_bd_year']=='0') $uderror='kein_datum_angegeben';
			if ($_POST['ud_sex']=='d') $uderror='kein_geschlecht_gewaehlt';
/********************************  Pflichtfeld Ende    ********************************/



SUCHE:
		$result=$S->query("SELECT 
			profilefields_id, 
			profilefields_description,
			profilefields_name,
			profilefields_maxlength
			FROM ".pkSQLTAB_USER_PROFILEFIELDS."
			ORDER by profilefields_order ASC");
		while(list($fieldid,$fielddescription,$fieldname,$fieldlength)=$S->fetch_row($result))
			{
			$value=pkEntities($userfields['field_'.$fieldid]);
			$name='profilefields['.$fieldid.']';
		
			eval("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield")."\";");
			}

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang. Original wir nur angepasst  ********************************/		
		$result=$S->query("SELECT 
			profilefields_id, 
			profilefields_description,
			profilefields_name,
			profilefields_maxlength,
			profilefields_groups,
			profilefields_status_edit,
			profilefields_pflicht,
			profilefields_area,
			profilefields_bbcode
			FROM ".pkSQLTAB_USER_PROFILEFIELDS."
			ORDER by profilefields_sorts ASC, profilefields_order ASC");
		while(list($fieldid,$fielddescription,$fieldname,$fieldlength,$fieldgroup,$fieldstatusedit,$fieldpflicht,$fieldarea,$fieldbbcode)=$S->fetch_row($result))
			{
			$value=pkEntities($userfields['field_'.$fieldid]);
			$name='profilefields['.$fieldid.']';
		
			if($fieldbbcode==1 AND $fielddescription!='') $code_ausgabe='<br><span style="color:#d70007;">BBCodes erlaubt</span>'; 
			elseif($fieldbbcode==1 AND $fielddescription=='') $code_ausgabe='<span style="color:#d70007;">BBCodes erlaubt</span>';
			else $code_ausgabe='';
			if($fieldgroup !="") 
			eval ("\$user_ext_group = \"".pkTpl("usereditprofile_userfield_group")."\";");
			else unset($user_ext_group);
			if (getrights($fieldstatusedit)=="true"){
			if($fieldpflicht=="0" AND $fieldarea=="0"){ unset($pflichtfeld);
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield")."\";");}
			elseif($fieldpflicht=="0" AND $fieldarea=="1"){ unset($pflichtfeld);
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield_area")."\";");}
			elseif($fieldpflicht=="0" AND $fieldarea=="2"){ unset($pflichtfeld);
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield_num")."\";");}
			elseif($fieldpflicht=="1" AND $fieldarea=="0"){$pflichtfeld='<span style="color:#d70007;">*</span>';
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield")."\";");}
			elseif($fieldpflicht=="1" AND $fieldarea=="1"){$pflichtfeld='<span style="color:#d70007;">*</span>';
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield_area")."\";");}
			elseif($fieldpflicht=="1" AND $fieldarea=="2"){$pflichtfeld='<span style="color:#d70007;">*</span>';
			eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_userfield_num")."\";");}
			} else eval ("\$editprofile_userfield.= \"".pkTpl("usereditprofile_no_edit")."\";");
			}
/********************************  Pflichtfeld Ende.   Original wir nur angepasst  ********************************/
####################################################################################################################
----------->
Editiere die pkinc/public/userinfo.php
-----------
SUCHE:
$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_order ASC");

ERSETZE ALLES HIERMIT:
/********************************  Pflichtfeld Anfang angepasst  ********************************/
$getprofilefields=$SQL->query("SELECT * FROM ".pkSQLTAB_USER_PROFILEFIELDS." ORDER by profilefields_sorts ASC, profilefields_order ASC");
/********************************  Pflichtfeld Ende angepasst    ********************************/



SUCHE:
	if(empty($fieldcontent))
		{
		$fieldcontent=$lang['not_specified'];
		}

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/	
	elseif($profilefields['profilefields_bbcode']==1) $fieldcontent=$BBCODE->parse($userfields[$f],0,1,pkGetConfig('text_smilies'),pkGetConfig('forum_images'),1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
	else $fieldcontent=$fieldcontent;
/********************************  Pflichtfeld Ende    ********************************/



SUCHE:
$fieldname=pkEntities($profilefields['profilefields_name']);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
  if($profilefields['profilefields_groups']!='') 
  eval ("\$info_extended_group = \"".pkTpl("userinfo_ext_group")."\";");
  else unset($info_extended_group);
  if (getrights($profilefields['profilefields_status'])=="true")
/********************************  Pflichtfeld Ende    ********************************/
####################################################################################################################
----------->
Editiere die pkinc/public/forumsthread.php
-----------
SUCHE:
			if($userinfo['user_icqid']>0)
				eval("\$info_icq= \"".pkTpl("forum/member_icq_iconlink")."\";");

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
     $userfields=$SQL->fetch_array($SQL->query("SELECT * FROM `".pkSQLTAB_USER_FIELDS."` WHERE `userid`='".intval($userinfo['user_id'])."' LIMIT 1"));
     $getprofilefields=$SQL->query("SELECT * FROM `".pkSQLTAB_USER_PROFILEFIELDS."` WHERE `profilefields_forum`='1' ORDER by `profilefields_sorts` ASC, `profilefields_order` ASC");
     while ($profilefields=$SQL->fetch_array($getprofilefields)) {
     $f="field_".$profilefields['profilefields_id'];
     $fieldcontent=pkEntities($userfields[$f]);
     if (empty($fieldcontent)) $fieldcontent=$lang['not_specified'];
     if($profilefields['profilefields_bbcode']=='1') {
     $fieldcontent=pkStringCut($fieldcontent,$profilefields['profilefields_cut']);
$fieldcontent=$BBCODE->parse($fieldcontent,0,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],pkGetConfig('forum_images'),1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
     } else {
     $fieldcontent=pkStringCut($fieldcontent,$profilefields['profilefields_cut']);
     $fieldcontent=pkEntities($fieldcontent);
     }
$fieldforum=$BBCODE->parse($profilefields['profilefields_forum_description'],1,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],pkGetConfig('forum_images'),1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
     if (getrights(pkGetConfig('member_infoshow'))=="true" AND getrights($profilefields['profilefields_status'])=="true") {
     eval ("\$pflicht_forum.= \"".pkTpl("forum/info_pflichtforum")."\";");}
     }
/********************************  Pflichtfeld Ende    ********************************/


SUCHE:
		unset($info_icq);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
		unset($pflicht_forum);
/********************************  Pflichtfeld Ende    ********************************/
####################################################################################################################
----------->
Editiere die pkinc/public/forumsearch.php
-----------
SUCHE:
			if($userinfo['user_icqid']>0)
				eval("\$info_icq= \"".pkTpl("forum/member_icq_iconlink")."\";");

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
     $userfields=$SQL->fetch_array($SQL->query("SELECT * FROM `".pkSQLTAB_USER_FIELDS."` WHERE `userid`='".intval($userinfo['user_id'])."' LIMIT 1"));
     $getprofilefields=$SQL->query("SELECT * FROM `".pkSQLTAB_USER_PROFILEFIELDS."` WHERE `profilefields_forum`='1' ORDER by `profilefields_sorts` ASC, `profilefields_order` ASC");
     while ($profilefields=$SQL->fetch_array($getprofilefields)) {
     $f="field_".$profilefields['profilefields_id'];
     $fieldcontent=pkEntities($userfields[$f]);
     if (empty($fieldcontent)) $fieldcontent=$lang['not_specified'];
     if($profilefields['profilefields_bbcode']=='1') {
     $fieldcontent=pkStringCut($fieldcontent,$profilefields['profilefields_cut']);
$fieldcontent=$BBCODE->parse($fieldcontent,0,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],pkGetConfig('forum_images'),1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
     } else {
     $fieldcontent=pkStringCut($fieldcontent,$profilefields['profilefields_cut']);
     $fieldcontent=pkEntities($fieldcontent);
     }
$fieldforum=$BBCODE->parse($profilefields['profilefields_forum_description'],1,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],pkGetConfig('forum_images'),1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
     if (getrights(pkGetConfig('member_infoshow'))=="true" AND getrights($profilefields['profilefields_status'])=="true") {
     eval ("\$pflicht_forum.= \"".pkTpl("forum/info_pflichtforum")."\";");}
     }
/********************************  Pflichtfeld Ende    ********************************/



SUCHE:
		unset($info_icq);

FGE DARUNTER DAS EIN:
/********************************  Pflichtfeld Anfang  ********************************/
		unset($pflicht_forum);
/********************************  Pflichtfeld Ende    ********************************/
####################################################################################################################
----------->
Editiere die pkinc/publictpl/forum/showthread_row.htm
-----------
SUCHE:
	 <tr>
	  <td>$avatar_show</td>
	 </tr>

FGE DARUNTER DAS EIN:
         $pflicht_forum
####################################################################################################################
----------->
Editiere die pkinc/publictpl/forum/search_result_post_row.htm
-----------
SUCHE:
	 <tr>
	  <td>$avatar_show</td>
	 </tr>

FGE DARUNTER DAS EIN:
         $pflicht_forum
####################################################################################################################
----------->
Editiere die pkinc/publictpl/register.htm
-----------
SUCHE:
 	$captcha

FGE DARBER DAS EIN:
 <tr>
  <td class="left">Geschlecht<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_sex" size="1">
	<option $user_sex_option_0 value="d">Geschlecht</option>
	<option $user_sex_option_1 value="w">weiblich</option>
	<option $user_sex_option_2 value="m">m&#228;nnlich</option>
	</select></td> 
  <td class="right small">Geben Sie hier Ihr Geschlecht an.</td>
 </tr>
 <tr>
  <td class="left">Geburtsdatum<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_bd_day" size="1">
	<option value="0">Tag</option>
	$bd_option_day
	</select>
	<select name="ud_bd_month" size="1">
	<option value="0">Monat</option>
	$bd_option_month
	</select>
	<select name="ud_bd_year" size="1">
	<option value="0">Jahr</option>
	$bd_option_year
	</select></td> 
  <td class="right small">Geben Sie Ihr Geburtsdatum an.</td>
 </tr>
 <tr>
  <td class="left">Herkunft<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_country" size="1" style="width: 90%">
		$user_country
	</select></td>
  <td class="right small">W&#228;hlen Sie Ihr Land.</td>
 </tr>
$editprofile_userfield
####################################################################################################################
----------->
Editiere die pkinc/publictpl/register2.htm
-----------
SUCHE:
 	$captcha

FGE DARBER DAS EIN:
 <tr>
  <td class="left">Geschlecht<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_sex" size="1">
	<option $user_sex_option_0 value="d">Geschlecht</option>
	<option $user_sex_option_1 value="w">weiblich</option>
	<option $user_sex_option_2 value="m">m&#228;nnlich</option>
	</select></td> 
  <td class="right small">Geben Sie hier Ihr Geschlecht an.</td>
 </tr>
 <tr>
  <td class="left">Geburtsdatum<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_bd_day" size="1">
	<option value="0">Tag</option>
	$bd_option_day
	</select>
	<select name="ud_bd_month" size="1">
	<option value="0">Monat</option>
	$bd_option_month
	</select>
	<select name="ud_bd_year" size="1">
	<option value="0">Jahr</option>
	$bd_option_year
	</select></td> 
  <td class="right small">Geben Sie Ihr Geburtsdatum an.</td>
 </tr>
 <tr>
  <td class="left">Herkunft<span style="color:#d70007;">*</span></td>
  <td class="right">
	<select name="ud_country" size="1" style="width: 90%">
		$user_country
	</select></td>
  <td class="right small">W&#228;hlen Sie Ihr Land.</td>
 </tr>
$editprofile_userfield
####################################################################################################################
----------->
Editiere die pkinc/publictpl/usereditprofile.htm
-----------
SUCHE:
  <td class="left">$L_editprofile_sex<br />

ERSETZE ALLES HIERMIT:
  <td class="left">$L_editprofile_sex<span style="color:#d70007;">*</span><br />


SUCHE:
  <td class="left">$L_editprofile_dateofbirth<br />

ERSETZE ALLES HIERMIT:
  <td class="left">$L_editprofile_dateofbirth<span style="color:#d70007;">*</span><br />


SUCHE:
  <td class="left">$L_editprofile_origin<br />

ERSETZE ALLES HIERMIT:
  <td class="left">$L_editprofile_origin<span style="color:#d70007;">*</span><br />
####################################################################################################################
----------->
Editiere die pkinc/publictpl/usereditprofile_userfield.htm
-----------
SUCHE:
 <tr>
  <td class="left">$fieldname<br />

ERSETZE ALLES HIERMIT:
$user_ext_group
 <tr>
  <td class="left">$fieldname $pflichtfeld $code_ausgabe<br />
####################################################################################################################
----------->
Editiere die pkinc/publictpl/userinfo_ext.htm
-----------
Fge ganz oben das ein:
$info_extended_group
####################################################################################################################




Nutzungsbedingungen
###################

1. Es ist nicht erlaubt das Script zu verndern und zum Download anzubieten!
   Es ist auch nicht erlaubt, es im Originalzustand weiterzugeben!

2. Der Copyright Hinweis darf nicht entfernt, verndert oder unkenntlich gemacht werden! 

3. Das Script darf weder als Ganzes noch in Teilen weitergegeben werden!


Mit dem Einsatz des Scriptes stimmst du diese Bedingungen zu.

Fr Fragen oder Anregungen:
#############################
www.esa-clan.de
esa@esa-clan.de
Gru//Lucky